
#ifndef  __DCPACKET_MANAGER_H__
#define  __DCPACKET_MANAGER_H__

#include <string>

#include "../../../include/DCData.h"



class DcPacketManager
{
public:
    DcPacketManager();
    ~DcPacketManager();

    //设备注册
    int get_dev_register_msg(int64_t req_id, const std::list<ST_MODEL_INFO>& lstDevinfo, std::string &msg);

    //设备取消注册
    int get_dev_unreg_msg(int64_t req_id, const std::list<ST_UNREG_DEVINFO>& lstDevinfo, std::string &msg);

    //设备注册通知
    int get_dev_register_notify(const std::string& msg, std::list<ST_REGISTER_NOTIFYPT>& lstRegisterNotify);

    //数据中心响应
    int get_dc_comm_rsp(const std::string& msg,  std::string& status);

    //模型设置
    int get_model_set_msg(int64_t req_id, const std::string& strmodel, std::list<ST_MODEL_PTINFO>& lstModels, std::string& msg);

    //模型查询接口
    int get_model_query_request(int64_t req_id,const std::list<std::string>& lstModelNames,std::string& msg);
    int get_model_query_response(const std::string& msg, std::list<ST_SINGLE_MODEL_INFO>& lstModels);
    //模型名称查询响应解析---与模型查询公用查询接口
    int get_model_name_query_rsp(const std::string& msg, std::list<std::string>& lstModelNames);

    //模型删除
    int get_model_dele_msg(int64_t req_id,const std::list<std::string>& lstModels,std::string& msg);

    //数据上报
    int get_datareport_msg(int64_t req_id, std::list<ST_REPORT_DATAPT>& lstReportPts,std::string& msg);

    //数据变化上报
    int get_datachange_report_msg(int64_t req_id, int datatype, std::list<ST_CHANGE_REPORT_DATAPT>& lstReportPts, std::string& msg);

    //注册关系查询
    int get_model_register_relationship_req(int64_t req_id, std::string& msg);
    int get_model_register_relationship_rsp(const std::string& msg, std::list<ST_REGISTER_MODEL_INFO>& lstRegisterRelation);

    //遥控命令转发接口  Todo:
    int get_trans_remotectrl_req_msg(int64_t req_id, std::list<ST_REMOTECTRL_CMD>& lstRemotrCtrl,std::string& msg);
    int get_trans_remotectrl_rsp_data(const std::string& msg, std::list<ST_REMOTECTRL_RSP>& lstRemotrCtrlRsp );

    //实时数据查询
    int get_realtime_data_req_msg(int64_t req_id, const std::list<std::string>& lstDevs,std::string& msg);
    int get_realtime_data_rsp_data(const std::string& msg, std::list<ST_REALTIME_QUERY_DEV_RSP>& lstRealtimeQueryRsp);
    
    //冻结数据上报
    int get_frozen_datareport_msg(int64_t req_id, std::list<ST_FROZEN_GROUP_DATA>& lstfrozen_group, std::string frozen_type, std::string& msg);
    //定值操作
    int get_notify_set_value_msg(NOTIFY_SET_VALUE& notify, std::string &msg);
    int get_query_set_value_msg(QUERY_SET_VALUE& query, std::string &msg);
    int get_query_set_value_obj(QUERY_SET_VALUE_DATAS& query, std::string &msg);

};
#endif